<html>
<head>
    <css file="__PUBLIC__/css/body.css"/>
    <css file="__STATIC__/icon/icon.css"/>
    <css file="__STATIC__/wbElement/wbElement.css"/>
    <css file="__STATIC__/My97DatePicker/skin/WdatePicker.css"/>
    <js file="__STATIC__/jquery-1.7.2.min.js"/>
    <js file="__STATIC__/wbElement/wbElement.js"/>
    <js file="__STATIC__/My97DatePicker/WdatePicker.js"/>
        <script type="text/javascript">
        function userpasson(){
            if($('#userpasson').html()=='修改密码')
            {
                $("#userpasson").html('取消修改');
                $("#userpass").css("display","inline");
            }
            else{
                $("#userpasson").html('修改密码');
                $("#userpass").val("");
                $("#userpass").css("display","none");
            }
        }
    </script>
    <style type="text/css">
        .lock span{float:left;height:30px;line-height:30px;}
        .lock input{float:left;}
        
        .locks span{float:left;margin-top:5px;}
        .locks div{float:left;margin-top:5px;margin-right: 5px;margin-left:5px;}
    </style>
</head>
<body>
<form action="{:U('Rbac/modifyUserHandle')}" method='post'>
    <div class="top">
        <div class="position"><span class="icon icon-31"></span>当前位置：修改用户信息</div>
        <div class="top-title">
            <span class="icon icon-32"></span>
            <div class="top-tool">
                <a class="button-a" href="{:U('Rbac/index')}">返回</a>
                <input class="button-b" type="submit" value="提交保存"/>
                <input type="hidden" name="uid" value="{:$user['id']}"/>
            </div>
        </div>
    </div>
    <div class="body">
       <table class="list-tb tableTd"  border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td class="textRight">用户ID：</td>
                <td>{:$user['id']}</td>
            </tr>
            <tr>
                <td width="10%" class="textRight">用户账号：</td>
                <td ><input type="text" name="username" value="{:$user['username']}"/><span class="remark">最大输入20个英文字符,支持中文</span></td>
            </tr>
            <tr>
                <td  class="textRight">密码：</td>
                <td style="font-weight: normal;">
                    <input type="password" style="display: none;" name="userpass" id="userpass"/>
                    <a id="userpasson" href="javascript:userpasson();">修改密码</a>
                </td>
            </tr>
            <tr>
                <td class="textRight">用户姓名：</td>
                <td ><input type="text" name="rename" value="{:$user['rename']}"/><span class="remark">最大输入15个英文字符,支持中文。可留空</span></td>
            </tr>
            <tr>
                <td class="textRight">性别：</td>
                <td>
                    <span class="lock" style="font-weight: normal;">
                        <input type="radio" name="sex" <if condition='$user["sex"]==0'>checked=""</if> value="0"/><span>男</span>
                        <input type="radio" name="sex" <if condition='$user["sex"]==1'>checked=""</if> value="1"/><span>女</span>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="textRight">生日：</td>
                <td ><input type="text" name="birthday" value="{:$user['birthday']}" readOnly="true"  class="Wdate" onclick="WdatePicker()"/><span class="remark">可留空</span></td>
            </tr>
       
            <tr>
                <td class="textRight">邮箱：</td>
                <td ><input type="text" name="email" value="{:$user['email']}"/><span class="remark">可留空</span></td>
            </tr>
            <tr>
                <td class="textRight">电话：</td>
                <td ><input type="text" name="mobile" value="{:$user['mobile']}"/><span class="remark">可留空</span></td>
            </tr>
            <tr>
                <td class="textRight">地址：</td>
                <td ><input type="text" name="address" value="{:$user['address']}"/><span class="remark">可留空</span></td>
            </tr>
            <tr>
                <td class="textRight">备注：</td>
                <td >
                    <textarea name="other">{:$user['other']}</textarea><br />
                    <span class="remark" style="margin-left: 0px;">最大可输入50个字符，可留空</span>
                </td>
            </tr>
            <tr>
                <td class="textRight">锁定：</td>
                <td >
                    <span class="lock" style="font-weight: normal;">
                        <input type="radio" name="lock" <if condition='$user["lock"]==0'>checked=""</if> value="0"/><span>开启</span>
                        <input type="radio" name="lock" <if condition='$user["lock"]==1'>checked=""</if> value="1"/><span>关闭</span>
                    </span>
                </td>
            </tr>
        
        
            <tr>
                <td class="textRight">所属角色：</td>
                <td style="font-weight: normal;" class="locks">
                    <foreach name='role' item='v'>
                                <div class="checkbox" <foreach name="user.role" item="u"><if condition='$v["id"]==$u["id"]'>checked="checked"</if></foreach> wname="role_id[]" value="{$v['id']}"></div>
                                <span>{$v.name}({$v.remark})</span>
                    </foreach>
                    <span class="remark">可留空</span>
                </td>
            </tr>
       </table>
    </div>
</form>
</body>
</html>